#include <gtk/gtk.h>
#include <string.h>
#include <stdlib.h>

gint main(int argc, int * argv[])
{
    if(argc != 2) g_print("%s", argv[0]);
    else ShowTree(argv[1]);
    return 0;
}

void ShowTree(const gchar * filename)
{
    int i;
    int indent = 0;
    int length = strlen(filename);
    for (int i = 0; i < length; i++)
    {
        if(filename[i] != G_DIR_SEPARATOR) g_print("%c", filename[i]);
        else
        {
            indent ++;
            if(indent == 1) g_print("dir ");
            else if(indent == 2) g_print(" contains ");
            else g_print(", which contains ");
        }
    }
    g_print("\n");
}